<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>药品管理</title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/css/table.css" type="text/css" rel="stylesheet"/>
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
	<script src="${ctx}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	<script type="text/javascript">
	function goInput(){

		var form = document.getElementById("mainForm");
		form.action = "medicine!input.action";
		$("#mainForm").submit();
	}
	function goRemind(){
		
		var form = document.getElementById("mainForm");
		form.action = "medicine!remind.action";
		$("#mainForm").submit();
	}
	</script>
</head>
<body>
<div style="font-family:Arial;font-size:15px;font-weight:bold;font-style:normal;align:left">当前位置：校园诊所--药品管理</div>
	<form id="mainForm" action="medicine.action" method="get">
	<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
	<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
	<input type="hidden" name="page.order" id="order" value="${page.order}"/>
	<div id="filter">
	<table width="70%" class="noborder">
	    <tr>
		     <td>入库单号：<input type="text" name="findPurchaseBatch" value="${findPurchaseBatch}" size="9"/></td>
		     <td>药品名称：<input type="text" name="drugName" value="${drugName}" size="9"/></td>
	    	 <td>入库日期：<input type="text" name="usefulLifeDate" value="<s:date name='usefulLifeDate' format='yyyy-MM-dd'/>" id="warehousingDate" readonly="readonly" size="9"
	    	 					 onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
	    	 			 </td>
	    	 <td><input type="button" onclick="search();" value="查询"></input></td>
	    </tr>	    
    </table>
    </div>
	<p></p><p></p>
	<div id="content">
		<table width="95%" border="1" id="customers">
			<tr>
				<th>序号</th>
				<th>入库单号</th>
				<th>入库方式</th>
				<th>入库药房</th>
				<th>入库日期</th>
				<th>药品名称</th>
				<th>规格</th>
				<th>数量</th>
				<th>操作</th>
			</tr>
			<s:iterator value="page.result">
			<tr>
				<td>${id}&nbsp;</td>
				<td>${purchaseBatch}&nbsp;</td>
				<td>${whsType.term}&nbsp;</td>
				<td>${whsPharmacy.term}&nbsp;</td>
				<td>${warehousingDate}&nbsp;</td>
				<td>${drug.term}&nbsp;</td>
				<td>${unit}&nbsp;</td>
				<td>${amount}&nbsp;</td>
				<td><a href="medicine!input.action?id=${id}">调整</a></td>
			</tr>
			</s:iterator>
		</table>
	</div>
	<p></p>
	<table width="95%" class="noborder">
	  <tr>
	  <!-- <a href="medicine-input.action">新增入库信息</a> -->
	  <td align="left"><s:submit type="button" theme="simple" onclick="goInput();">新增入库信息</s:submit></td>
	  <td><s:submit type="button" theme="simple" onclick="goRemind();">库存提醒</s:submit></td>
	  <td colspan="2"  align="right" >第${page.pageNo}页, 共${page.totalPages}页
		<a href="javascript:jumpPage(1)">首页</a>
		<s:if test="page.hasPre"><a href="javascript:jumpPage(${page.prePage})">上一页</a></s:if>
		<s:if test="page.hasNext"><a href="javascript:jumpPage(${page.nextPage})">下一页</a></s:if>
		<a href="javascript:jumpPage(${page.totalPages})">末页</a>
	  </td>
	  </tr>
	</table> 
</form>		
</body>
</html>